package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DataApplicationMapper;
import com.ruoyi.system.domain.DataApplication;
import com.ruoyi.system.service.IDataApplicationService;

/**
 * 试用申请管理Service业务层处理
 * 
 * @author hak
 * @date 2024-11-13
 */
@Service
public class DataApplicationServiceImpl implements IDataApplicationService 
{
    @Autowired
    private DataApplicationMapper dataApplicationMapper;

    /**
     * 查询试用申请管理
     * 
     * @param applicationId 试用申请管理主键
     * @return 试用申请管理
     */
    @Override
    public DataApplication selectDataApplicationByApplicationId(Long applicationId)
    {
        return dataApplicationMapper.selectDataApplicationByApplicationId(applicationId);
    }

    /**
     * 查询试用申请管理列表
     * 
     * @param dataApplication 试用申请管理
     * @return 试用申请管理
     */
    @Override
    public List<DataApplication> selectDataApplicationList(DataApplication dataApplication)
    {
        return dataApplicationMapper.selectDataApplicationList(dataApplication);
    }

    /**
     * 新增试用申请管理
     * 
     * @param dataApplication 试用申请管理
     * @return 结果
     */
    @Override
    public int insertDataApplication(DataApplication dataApplication)
    {
        dataApplication.setCreateTime(DateUtils.getNowDate());
        return dataApplicationMapper.insertDataApplication(dataApplication);
    }

    /**
     * 修改试用申请管理
     * 
     * @param dataApplication 试用申请管理
     * @return 结果
     */
    @Override
    public int updateDataApplication(DataApplication dataApplication)
    {
        dataApplication.setUpdateTime(DateUtils.getNowDate());
        return dataApplicationMapper.updateDataApplication(dataApplication);
    }

    /**
     * 批量删除试用申请管理
     * 
     * @param applicationIds 需要删除的试用申请管理主键
     * @return 结果
     */
    @Override
    public int deleteDataApplicationByApplicationIds(Long[] applicationIds)
    {
        return dataApplicationMapper.deleteDataApplicationByApplicationIds(applicationIds);
    }

    /**
     * 删除试用申请管理信息
     * 
     * @param applicationId 试用申请管理主键
     * @return 结果
     */
    @Override
    public int deleteDataApplicationByApplicationId(Long applicationId)
    {
        return dataApplicationMapper.deleteDataApplicationByApplicationId(applicationId);
    }
}
